//
//  YZMConfirmiforTableViewCell.m
//  YZMicroStock
//
//  Created by apple on 16/11/7.
//  Copyright © 2016年 cqjr. All rights reserved.
//

#import "YZMConfirmiforTableViewCell.h"
#import "NSNumber+Utils.h"

@interface YZMConfirmiforTableViewCell()
@property(nonatomic, strong) UILabel *nameLabel;
@property(nonatomic, strong) UILabel *valueLabel;
@property(nonatomic, strong) UIView *line;

@end

@implementation YZMConfirmiforTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self createObject];
        self.backgroundColor = [YZMAppStyle colorForMain];
    }
    return self;
}

-(void)createObject
{
    self.nameLabel=[YZMAppStyle labelWithMediumWhite];
    [self addSubview:_nameLabel];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self).offset(15);
        make.top.mas_equalTo(self).offset(13);
        make.height.mas_equalTo(14);
    }];
    
    self.valueLabel=[YZMAppStyle labelWithLargeYellow];
    [self addSubview:_valueLabel];
    [_valueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(self.mas_right).offset(-15);
        make.top.mas_equalTo(self).offset(15);
        make.height.mas_equalTo(19);
    }];
}

-(void)setDatasource:(NSArray *)datasource
{
    _nameLabel.text = datasource[0];
    _valueLabel.text = [NSString stringWithFormat:@"%@", [datasource[1] r2fString]];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
